package com.example.star.api_service;
import com.example.star.entity.Feedback;
import com.example.star.entity.Reply;
import com.example.star.entity.User;

import java.util.List;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ApiFeedback {

    @GET("feedback")
    Call<List<Feedback>> getAllFeedbacks();

    @GET("reply")
    Call<List<Reply>> getAllReply();

    @POST("feedback")
    Call<Void> createFeedback(@Body Feedback feedback);
    @GET("users/normal")
    Call<List<User>> getNormalUsers();

    @GET("users/admin")
    Call<List<User>> getAdminUsers();
    @GET("users_by_username")
    Call<User> getUserByUsername(@Query("username") String username);

    @GET("feedback/admin/{adminName}")
    Call<List<Feedback>> getFeedbacksByAdminName(@Path("adminName") String adminName);

    @POST("reply")
    Call<Void> createReply(@Body Reply reply);

    @GET("reply/user/{userName}")
    Call<List<Reply>> getRepliesByUserName(@Path("userName") String userName);

}